package com.ecommerce.order.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * 用户服务Feign客户端
 */
@FeignClient(name = "user-service", path = "/api/users")
public interface UserServiceClient {

    /**
     * 根据ID获取用户信息
     * @param userId 用户ID
     * @param token 认证令牌
     * @return 用户信息
     */
    @GetMapping("/{userId}")
    String getUserById(@PathVariable("userId") Long userId, @RequestHeader("Authorization") String token);
}